package com.zy.experience_system.exception;

import com.zy.experience_system.enums.ResultEnum;
import lombok.Getter;

@Getter
public class CommonException extends RuntimeException{

    private Integer code;

    public CommonException(ResultEnum resultEnum){
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public CommonException(Integer code,String msg){
        super(msg);
        this.code = code;
    }

}
